import 'package:my_blog_flutter/generated/json/base/json_field.dart';
import 'package:my_blog_flutter/generated/json/comment_entity.g.dart';
import 'dart:convert';
export 'package:my_blog_flutter/generated/json/comment_entity.g.dart';

@JsonSerializable()
class CommentEntity {
	int? code = 0;
	String? message = '';
	CommentData? data;
	int? timestamp = 0;

	CommentEntity();

	factory CommentEntity.fromJson(Map<String, dynamic> json) => $CommentEntityFromJson(json);

	Map<String, dynamic> toJson() => $CommentEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class CommentData {
	int? totalCount = 0;
	List<CommentDataList>? list = [];

	CommentData();

	factory CommentData.fromJson(Map<String, dynamic> json) => $CommentDataFromJson(json);

	Map<String, dynamic> toJson() => $CommentDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class CommentDataList {
	int? id = 0;
	String? userName = '';
	String? content = '';
	String? createTime = '';

	CommentDataList();

	factory CommentDataList.fromJson(Map<String, dynamic> json) => $CommentDataListFromJson(json);

	Map<String, dynamic> toJson() => $CommentDataListToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}